package trace

const (
	// SamplerTypeConst is the type of sampler that always makes the same decision.
	SamplerTypeConst = "const"

	// SamplerTypeRemote is the type of sampler that polls Jaeger agent for sampling strategy.
	SamplerTypeRemote = "remote"

	// SamplerTypeProbabilistic is the type of sampler that samples traces
	// with a certain fixed probability.
	SamplerTypeProbabilistic = "probabilistic"

	// SamplerTypeRateLimiting is the type of sampler that samples
	// only up to a fixed number of traces per second.
	SamplerTypeRateLimiting = "ratelimiting"
)

// sampler decides whether a new trace should be sampled or not.
type sampler interface {
	//
	IsSampled(traceID uint64, operationName string) (bool, float64)
	//
	Close() error
}

//
type SamplerConfig struct {
	Type  string
	Param float64
}
